3.25 \(\int x (a+b \log (c x^n)) \log (d (\frac {1}{d}+f x^2)) \, dx\)

Optimal. Leaf size=114 \[ \frac {\left (d f x^2+1\right ) \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{2 d f}-\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {b n \text {Li}_2\left (-d f x^2\right )}{4 d f}-\frac {b n \left (d f x^2+1\right ) \log \left (d f x^2+1\right )}{4 d f}+\frac {1}{2} b n x^2 \]

[Out]

1/2*b*n*x^2-1/2*x^2*(a+b*ln(c*x^n))-1/4*b*n*(d*f*x^2+1)*ln(d*f*x^2+1)/d/f+1/2*(d*f*x^2+1)*(a+b*ln(c*x^n))*ln(d
*f*x^2+1)/d/f+1/4*b*n*polylog(2,-d*f*x^2)/d/f

________________________________________________________________________________________

Rubi [A]  time = 0.18, antiderivative size = 114, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 9, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {2454, 2389, 2295, 2376, 2475, 2411, 43, 2351, 2315} \[ \frac {b n \text {PolyLog}\left (2,-d f x^2\right )}{4 d f}+\frac {\left (d f x^2+1\right ) \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{2 d f}-\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )-\frac {b n \left (d f x^2+1\right ) \log \left (d f x^2+1\right )}{4 d f}+\frac {1}{2} b n x^2 \]

Antiderivative was successfully verified.

[In]

Int[x*(a + b*Log[c*x^n])*Log[d*(d^(-1) + f*x^2)],x]

[Out]

(b*n*x^2)/2 - (x^2*(a + b*Log[c*x^n]))/2 - (b*n*(1 + d*f*x^2)*Log[1 + d*f*x^2])/(4*d*f) + ((1 + d*f*x^2)*(a +
b*Log[c*x^n])*Log[1 + d*f*x^2])/(2*d*f) + (b*n*PolyLog[2, -(d*f*x^2)])/(4*d*f)

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2351

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c,
d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && IntegerQ[r]))

Rule 2376

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((g_.)*(x_))^(q_.), x_Sym
bol] :> With[{u = IntHide[(g*x)^q*Log[d*(e + f*x^m)^r], x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[Dist
[1/x, u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && (IntegerQ[(q + 1)/m] || (RationalQ[m] &
& RationalQ[q])) && NeQ[q, -1]

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2411

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[((g*x)/e)^q*((e*h - d*i)/e + (i*x)/e)^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rule 2454

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[I
nt[x^(Simplify[(m + 1)/n] - 1)*(a + b*Log[c*(d + e*x)^p])^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p,
 q}, x] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0]) &&  !(EqQ[q, 1] && ILtQ[n, 0] &&
 IGtQ[m, 0])

Rule 2475

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.)*((f_) + (g_.)*(x_)^(s_))^(r_.),
 x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(f + g*x^(s/n))^r*(a + b*Log[c*(d + e*x)^p])^q,
x], x, x^n], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, q, r, s}, x] && IntegerQ[r] && IntegerQ[s/n] && Intege
rQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0])

Rubi steps

\begin {align*} \int x \left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (\frac {1}{d}+f x^2\right )\right ) \, dx &=-\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {\left (1+d f x^2\right ) \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 d f}-(b n) \int \left (-\frac {x}{2}+\frac {\left (1+d f x^2\right ) \log \left (1+d f x^2\right )}{2 d f x}\right ) \, dx\\ &=\frac {1}{4} b n x^2-\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {\left (1+d f x^2\right ) \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 d f}-\frac {(b n) \int \frac {\left (1+d f x^2\right ) \log \left (1+d f x^2\right )}{x} \, dx}{2 d f}\\ &=\frac {1}{4} b n x^2-\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {\left (1+d f x^2\right ) \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 d f}-\frac {(b n) \operatorname {Subst}\left (\int \frac {(1+d f x) \log (1+d f x)}{x} \, dx,x,x^2\right )}{4 d f}\\ &=\frac {1}{4} b n x^2-\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {\left (1+d f x^2\right ) \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 d f}-\frac {(b n) \operatorname {Subst}\left (\int \frac {x \log (x)}{-\frac {1}{d f}+\frac {x}{d f}} \, dx,x,1+d f x^2\right )}{4 d^2 f^2}\\ &=\frac {1}{4} b n x^2-\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {\left (1+d f x^2\right ) \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 d f}-\frac {(b n) \operatorname {Subst}\left (\int \left (d f \log (x)+\frac {d f \log (x)}{-1+x}\right ) \, dx,x,1+d f x^2\right )}{4 d^2 f^2}\\ &=\frac {1}{4} b n x^2-\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {\left (1+d f x^2\right ) \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 d f}-\frac {(b n) \operatorname {Subst}\left (\int \log (x) \, dx,x,1+d f x^2\right )}{4 d f}-\frac {(b n) \operatorname {Subst}\left (\int \frac {\log (x)}{-1+x} \, dx,x,1+d f x^2\right )}{4 d f}\\ &=\frac {1}{2} b n x^2-\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )-\frac {b n \left (1+d f x^2\right ) \log \left (1+d f x^2\right )}{4 d f}+\frac {\left (1+d f x^2\right ) \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 d f}+\frac {b n \text {Li}_2\left (-d f x^2\right )}{4 d f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.05, size = 267, normalized size = 2.34 \[ \frac {1}{2} a \left (\frac {\left (d f x^2+1\right ) \log \left (d f x^2+1\right )}{d f}-x^2\right )+\frac {1}{4} b x^2 \left (2 \left (\log \left (c x^n\right )-n \log (x)\right )+2 n \log (x)-n\right ) \log \left (d f x^2+1\right )+\frac {b \left (2 \left (\log \left (c x^n\right )-n \log (x)\right )-n\right ) \log \left (d f x^2+1\right )}{4 d f}+\frac {1}{4} b x^2 \left (n-2 \left (\log \left (c x^n\right )-n \log (x)\right )\right )-b d f n \left (-\frac {\text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )+\log (x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )}{2 d^2 f^2}-\frac {\text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )+\log (x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )}{2 d^2 f^2}+\frac {\frac {1}{2} x^2 \log (x)-\frac {x^2}{4}}{d f}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[x*(a + b*Log[c*x^n])*Log[d*(d^(-1) + f*x^2)],x]

[Out]

(b*x^2*(n - 2*(-(n*Log[x]) + Log[c*x^n])))/4 + (b*(-n + 2*(-(n*Log[x]) + Log[c*x^n]))*Log[1 + d*f*x^2])/(4*d*f
) + (b*x^2*(-n + 2*n*Log[x] + 2*(-(n*Log[x]) + Log[c*x^n]))*Log[1 + d*f*x^2])/4 + (a*(-x^2 + ((1 + d*f*x^2)*Lo
g[1 + d*f*x^2])/(d*f)))/2 - b*d*f*n*((-1/4*x^2 + (x^2*Log[x])/2)/(d*f) - (Log[x]*Log[1 + I*Sqrt[d]*Sqrt[f]*x]
+ PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*x])/(2*d^2*f^2) - (Log[x]*Log[1 - I*Sqrt[d]*Sqrt[f]*x] + PolyLog[2, I*Sqrt[d
]*Sqrt[f]*x])/(2*d^2*f^2))

________________________________________________________________________________________

fricas [F]  time = 0.53, size = 0, normalized size = 0.00 \[ {\rm integral}\left (b x \log \left (d f x^{2} + 1\right ) \log \left (c x^{n}\right ) + a x \log \left (d f x^{2} + 1\right ), x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*x^n))*log(d*(1/d+f*x^2)),x, algorithm="fricas")

[Out]

integral(b*x*log(d*f*x^2 + 1)*log(c*x^n) + a*x*log(d*f*x^2 + 1), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \log \left (c x^{n}\right ) + a\right )} x \log \left ({\left (f x^{2} + \frac {1}{d}\right )} d\right )\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*x^n))*log(d*(1/d+f*x^2)),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)*x*log((f*x^2 + 1/d)*d), x)

________________________________________________________________________________________

maple [C]  time = 0.27, size = 820, normalized size = 7.19 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(b*ln(c*x^n)+a)*ln((f*x^2+1/d)*d),x)

[Out]

-1/4*b*n/d/f*ln(d*f*x^2+1)-1/2*a/d/f-1/2*a*x^2-1/4*n*b*x^2*ln(d*f*x^2+1)-1/2/d/f*b*ln(c)+1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*c)-1/4*I/d/f*Pi*b*csgn(I*c*x^n)^2*csgn(I*c)+1/4*I*ln((f*x^2+1/d)*d)*Pi*x^2
*b*csgn(I*x^n)*csgn(I*c*x^n)^2-1/4*I/d/f*ln((f*x^2+1/d)*d)*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {1}{4} \, {\left (2 \, b x^{2} \log \left (x^{n}\right ) - {\left (b {\left (n - 2 \, \log \relax (c)\right )} - 2 \, a\right )} x^{2}\right )} \log \left (d f x^{2} + 1\right ) - \int \frac {2 \, b d f x^{3} \log \left (x^{n}\right ) + {\left (2 \, a d f - {\left (d f n - 2 \, d f \log \relax (c)\right )} b\right )} x^{3}}{2 \, {\left (d f x^{2} + 1\right )}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*x^n))*log(d*(1/d+f*x^2)),x, algorithm="maxima")

[Out]

1/4*(2*b*x^2*log(x^n) - (b*(n - 2*log(c)) - 2*a)*x^2)*log(d*f*x^2 + 1) - integrate(1/2*(2*b*d*f*x^3*log(x^n) +
 (2*a*d*f - (d*f*n - 2*d*f*log(c))*b)*x^3)/(d*f*x^2 + 1), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int x\,\ln \left (d\,\left (f\,x^2+\frac {1}{d}\right )\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right ) \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*log(d*(f*x^2 + 1/d))*(a + b*log(c*x^n)),x)

[Out]

int(x*log(d*(f*x^2 + 1/d))*(a + b*log(c*x^n)), x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*ln(c*x**n))*ln(d*(1/d+f*x**2)),x)

[Out]

Timed out

________________________________________________________________________________________